-
Notifications
You must be signed in to change notification settings - Fork 46.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DevTools: Add root and renderer version to inspected props panel #18963
Conversation
|
||
if (hocDisplayNames !== null) { | ||
totalBadgeCount += hocDisplayNames.length; | ||
if (hocDisplayNames === null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a regression from #18802 I think.
rendererPackageName !== null && rendererVersion !== null | ||
? `${rendererPackageName}@${rendererVersion}` | ||
: null; | ||
const showRenderedBy = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll always show this section now, except for v15.
if (__DEV__) { | ||
switch (tag) { | ||
case BlockingRoot: | ||
this._debugRootType = 'createBlockingRoot()'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This minimizes the coupling between React and DevTools.
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 5dbafca:
|
Details of bundled changes.Comparing: 099f737...5dbafca react-dom
react-art
react-test-renderer
react-reconciler
react-native-renderer
ReactDOM: size: 0.0%, gzip: -0.0% Size changes (experimental) |
Details of bundled changes.Comparing: 099f737...5dbafca react-native-renderer
react-dom
react-art
react-test-renderer
react-reconciler
ReactDOM: size: 0.0%, gzip: -0.0% Size changes (stable) |
{owners !== null && | ||
owners.length > 0 && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you intentionally checing this condition twice (also in showRenderedBy
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes in that the !== null
check is for Flow. I guess I could technically get rid of the second owners.length
check if I moved owners !== null && owners.length > 0
above into a second variable– or if I added an explicit inline casting- but it seemed kind of not worth doing since it's not really hot path code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll just add the Flow casting to get rid of the second check though 😄 I don't mind.
fbacbf5
to
5dbafca
Compare
Adds the root API and renderer version to the bottom of the "rendered by" list. (If this info is missing, we degrade gracefully.)
Screenshots